import React from 'react';
import Topic, { TopicProps } from './topic';
import Show, { ShowProps } from './show';

export default ({ isOnlyShow, ...props }: (TopicProps | ShowProps) & { isOnlyShow?: boolean }) => {
  if (isOnlyShow) {
    return <Show {...props as ShowProps} />
  } else {
    return <Topic {...props as TopicProps} />
  }
}